package com.yh.blog.controller;

import com.yh.blog.domain.Blog;
import com.yh.blog.service.BlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class time_axisShowController {
    @Autowired
    private BlogService blogService;
    @GetMapping("/time")
    public String time(Model model){
        Blog condition=new Blog();
        condition.setPublish(true);
        model.addAttribute("blogs",this.blogService.list(condition));
        return "time_axis";
    }
}
